<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="/template.xhtml">
        
        <ui:define name="title">
            <h:outputText value="#{bundle['ERROR.403.PermissionDenied']}"></h:outputText>
        </ui:define>
        <ui:define name="menu">
            <div class="block_menu">
                <h:form>
                    <div class="block_menu_left">
                        <h:commandLink action="/index" value="#{bundle['Menu.Main']}"/>
                    </div>
                    <div class="block_menu_left">
                        <h:commandLink action="/notes/List" value="#{bundle['Menu.Notes']}"/>
                    </div>
                    
                    <h:panelGroup rendered="#{userManagerController.isAuthenticated() == 0}">
                        <div class="block_menu_right">
                            <h:commandLink action="/authenticate/Registration" value="#{bundle['Menu.Registration']}"/>
                        </div>

                        <div class="block_menu_right">
                            <h:commandLink action="/authenticate/Login" value="#{bundle['Menu.Login']}"/>
                        </div>
                    </h:panelGroup>
                    <h:panelGroup rendered="#{userManagerController.isAuthenticated() == 1}">
                        <div class="block_menu_right">
                            <h:commandLink action="#{userManagerController.logout()}" value="#{bundle['Menu.Logout']}"/>
                        </div>
                        
                        <div class="block_menu_right">
                            <h:commandLink action="/profile/View" value="Hello #{userManagerController.getAuthenticatedUserName()}"/>
                        </div>                   
                        <h:panelGroup rendered="#{userManagerController.isRoleAdmin() == 1}">
                            <div class="block_menu_left">
                                <h:commandLink action="/users/List" value="#{bundle['Menu.UsersManagement']}"/>
                            </div>
                        </h:panelGroup>
                    </h:panelGroup>
                </h:form>
            </div>
        </ui:define>
        <ui:define name="body">
        <h:messages errorClass="error" infoClass="info" />
        <center>
            <h:outputText value="#{bundle['ERROR.403']}"
                style="color: #707070; font-weight: bold; font-size: 120pt;" />
            <br/>
            <h:outputText value="#{bundle['ERROR.403.PermissionDenied']}"
                style="color: #707070; font-weight: bold; font-size: 20pt"  />
        </center>
        </ui:define>
    </ui:composition>
</html>

